<%@page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/commons/inc.jsp" %>

<h3 id="navTitleId">营养调查</h3>
<script>
function showtips(tips,flag){ 
	var tip=document.getElementById(tips);
	if(tip.style.display=="none"){ 
	        tip.style.display="inline";
	        //my_tips.style.left=event.clientX+10; 
	        //my_tips.style.top=event.clientY+10; 
	}else{ 
	      tip.style.display="none"; 
	} 
}
</script>
<body id="body">
<br><a onclick="showtips('13',1);">【营养调查表】
<br><img id='13' style="display:none" src="../images/tips/13.png" />
</a>
<%@include file="/commons/showmessage.jsp" %>

<form name="nutriSurveyform" id="nutriSurveyform" method="post" action="${contextPath}/nutrition/nutrition.action?method=saveEditNutritionSurvey">
	<s:hidden name="nutriSurvey.nutrisurveyid" id="nutriSurvey.nutrisurveyid"></s:hidden>
	<s:hidden name="nutriSurvey.patientid" id="nutriSurvey.patientid"></s:hidden>
	<s:hidden name="patientid" id="patientid"></s:hidden>
	
	<table border="0" cellspacing="1" cellpadding="0" class="formTable" width="100%" >
      <thead>
        <tr>
          <td width="20" align="center" class="form-th">食用量(g)</td>
          <td width="20"  align="center" class="form-th">谷薯类(主食)</td>
		  <td width="20" align="center" class="form-th">蔬菜类</td>
          <td width="20"  align="center" class="form-th">鱼肉蛋类</td>
          <td width="20" align="center" class="form-th">豆类</td>
          <td width="20"  align="center" class="form-th">乳类</td>
          <td width="20"  align="center" class="form-th">水果类</td>
          <td width="20"  align="center" class="form-th">油脂类</td>
        </tr>
      </thead>
      <tbody>
      <tr>
         <td align="left" class="form-td">早餐</td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.zhushia"   size="5" id="nutriSurvey.zhushia" value="${nutriSurvey.zhushia}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.shucaia"   size="5" id="nutriSurvey.shucaia" value="${nutriSurvey.shucaia}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.yuroua"   size="5" id="nutriSurvey.yuroua" value="${nutriSurvey.yuroua}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.doua"   size="5" id="nutriSurvey.doua" value="${nutriSurvey.doua}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.rua"   size="5" id="nutriSurvey.rua" value="${nutriSurvey.rua}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.shuiguoa"   size="5" id="nutriSurvey.shuiguoa" value="${nutriSurvey.shuiguoa}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.youzhia"   size="5" id="nutriSurvey.youzhia" value="${nutriSurvey.youzhia}"/></td>
      </tr>  
     <tr>
         <td align="left" class="form-td">中餐</td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.zhushib"   size="5" id="nutriSurvey.zhushib" value="${nutriSurvey.zhushib}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.shucaib"   size="5" id="nutriSurvey.shucaib" value="${nutriSurvey.shucaib}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.yuroub"   size="5" id="nutriSurvey.yuroub" value="${nutriSurvey.yuroub}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.doub"  size="5" id="nutriSurvey.doub" value="${nutriSurvey.doub}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.rub"  size="5" id="nutriSurvey.rub" value="${nutriSurvey.rub}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.shuiguob"  size="5" id="nutriSurvey.shuiguob" value="${nutriSurvey.shuiguob}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.youzhib"  size="5" id="nutriSurvey.youzhib" value="${nutriSurvey.youzhib}"/></td>
      </tr>
      <tr>
         <td align="left" class="form-td">晚餐</td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.zhushic"  size="5" id="nutriSurvey.zhushic" value="${nutriSurvey.zhushic}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.shucaic" size="5" id="nutriSurvey.shucaic" value="${nutriSurvey.shucaic}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.yurouc"  size="5" id="nutriSurvey.yurouc" value="${nutriSurvey.yurouc}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.douc"  size="5" id="nutriSurvey.douc" value="${nutriSurvey.douc}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.ruc"  size="5" id="nutriSurvey.ruc" value="${nutriSurvey.ruc}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.shuiguoc" size="5" id="nutriSurvey.shuiguoc" value="${nutriSurvey.shuiguoc}"/></td>
         <td align="left" class="form-td"><input type="text" name="nutriSurvey.youzhic"  size="5" id="nutriSurvey.youzhic" value="${nutriSurvey.youzhic}"/></td>
      </tr>
       <tr>
         <td align="left" class="form-td">合计</td>
         <td align="left" class="form-td"><input type="text"  name="nutriSurvey.zhushitotal" size="5" id="nutriSurvey.zhushitotal" value="${nutriSurvey.zhushitotal}"/></td>
         <td align="left" class="form-td"><input type="text"  name="nutriSurvey.shucaitotal" size="5" id="nutriSurvey.shucaitotal" value="${nutriSurvey.shucaitotal}"/></td>
         <td align="left" class="form-td"><input type="text"  name="nutriSurvey.yuroutotal" size="5" id="nutriSurvey.yuroutotal" value="${nutriSurvey.yuroutotal}"/></td>
         <td align="left" class="form-td"><input type="text"  name="nutriSurvey.doutotal" size="5" id="nutriSurvey.doutotal" value="${nutriSurvey.doutotal}"/></td>
         <td align="left" class="form-td"><input type="text"  name="nutriSurvey.rutotal" size="5" id="nutriSurvey.rutotal" value="${nutriSurvey.rutotal}"/></td>
         <td align="left" class="form-td"><input type="text"  name="nutriSurvey.shuiguototal" size="5" id="nutriSurvey.shuiguototal" value="${nutriSurvey.shuiguototal}"/></td>
         <td align="left" class="form-td"><input type="text"  name="nutriSurvey.youzhitotal" size="5" id="nutriSurvey.youzhitotal" value="${nutriSurvey.youzhitotal}"/></td>
      </tr>
      </tbody>
    </table>
 	 
	<table>
		<tr>
			<td align="center"> 
			<input type="reset" value="重置"> 
		    <input type="button" onclick="saveEdit('save');" value="保存"></td>
		</tr>
	</table>
</form>

<%@include file="/commons/tableSel.jsp" %>

</body>

<style type="text/css">
body {
	height: 100%;
	width: 100%;
}
</style>

<script>
function saveEdit(type){
	if(type=='refresh'){
		location.reload();
	}else if(type=='save'){
		if(!Validator.Validate($('nutriSurveyform'),3)){
			return;
		}	
		$('nutriSurveyform').submit();
	}
}
/*
function zhushi(){
	var a = $('nutriSurvey.zhushia').value;
	var b = $('nutriSurvey.zhushib').value;
	var c = $('nutriSurvey.zhushic').value;
	var total = 0.0;
	if(a==null || a==''){
		a=0.0;
	}
	if(b==null|| b==''){
		b=0.0;
	}
	if(c==null || c==''){
		c=0.0;
	}
	total = parseFloat(a)+ parseFloat(b) + parseFloat(c);
	$('nutriSurvey.zhushitotal').value =  total.toFixed(1);
}
function shucai(){
	var a = $('nutriSurvey.shucaia').value;
	var b = $('nutriSurvey.shucaib').value;
	var c = $('nutriSurvey.shucaic').value;
	var total = 0.0;
	if(a==null || a==''){
		a=0.0;
	}
	if(b==null|| b==''){
		b=0.0;
	}
	if(c==null || c==''){
		c=0.0;
	}
	total = parseFloat(a)+ parseFloat(b) + parseFloat(c);
	$('nutriSurvey.shucaitotal').value =  total.toFixed(1);
}
function yurou(){
	var a = $('nutriSurvey.yuroua').value;
	var b = $('nutriSurvey.yuroub').value;
	var c = $('nutriSurvey.yurouc').value;
	var total = 0.0;
	if(a==null || a==''){
		a=0.0;
	}
	if(b==null|| b==''){
		b=0.0;
	}
	if(c==null || c==''){
		c=0.0;
	}
	total = parseFloat(a)+ parseFloat(b) + parseFloat(c);
	$('nutriSurvey.yuroutotal').value =  total.toFixed(1);
}
function dou(){
	var a = $('nutriSurvey.doua').value;
	var b = $('nutriSurvey.doub').value;
	var c = $('nutriSurvey.douc').value;
	var total = 0.0;
	if(a==null || a==''){
		a=0.0;
	}
	if(b==null|| b==''){
		b=0.0;
	}
	if(c==null || c==''){
		c=0.0;
	}
	total = parseFloat(a)+ parseFloat(b) + parseFloat(c);
	$('nutriSurvey.doutotal').value =  total.toFixed(1);
}
function ru(){
	var a = $('nutriSurvey.rua').value;
	var b = $('nutriSurvey.rub').value;
	var c = $('nutriSurvey.ruc').value;
	var total = 0.0;
	if(a==null || a==''){
		a=0.0;
	}
	if(b==null|| b==''){
		b=0.0;
	}
	if(c==null || c==''){
		c=0.0;
	}
	total = parseFloat(a)+ parseFloat(b) + parseFloat(c);
	$('nutriSurvey.rutotal').value =  total.toFixed(1);
}
function shuiguo(){
	var a = $('nutriSurvey.shuiguoa').value;
	var b = $('nutriSurvey.shuiguob').value;
	var c = $('nutriSurvey.shuiguoc').value;
	var total = 0.0;
	if(a==null || a==''){
		a=0.0;
	}
	if(b==null|| b==''){
		b=0.0;
	}
	if(c==null || c==''){
		c=0.0;
	}
	total = parseFloat(a)+ parseFloat(b) + parseFloat(c);
	$('nutriSurvey.shuiguototal').value =  total.toFixed(1);
}
function youzhi(){
	var a = $('nutriSurvey.youzhia').value;
	var b = $('nutriSurvey.youzhib').value;
	var c = $('nutriSurvey.youzhic').value;
	var total = 0.0;
	if(a==null || a==''){
		a=0.0;
	}
	if(b==null|| b==''){
		b=0.0;
	}
	if(c==null || c==''){
		c=0.0;
	}
	total = parseFloat(a)+ parseFloat(b) + parseFloat(c);
	$('nutriSurvey.youzhitotal').value =  total.toFixed(1);
}
*/
</script>